@echo off

set hh=%TIME:~0,2%
if /i %hh% LSS 10 (set hh=0%TIME:~1,1%)
set LOGNAME=%DATE:~0,4%_%DATE:~5,2%_%DATE:~8,2%_%hh%_%TIME:~3,2%_%TIME:~6,2%

mkdir %LOGNAME%

echo %LOGNAME%

set WORKPATH="C:\Users\meicai\eclipse-workspace\appium\"

cd %WORKPATH%

rm report.txt

copy report.temp report.txt

call mvn test > report.log

::ExtentReports
::copy ExtentReports\ExtentReportResults.html %LOGNAME%\report-%LOGNAME%.html
::copy ExtentReports\ExtentReportResults.html C:\Users\meicai\Downloads\apache-tomcat-9.0.10\webapps\docs\reports\report-%LOGNAME%.html


copy test-output\index.html %LOGNAME%\report-%LOGNAME%.html
copy test-output\index.html C:\Users\meicai\Downloads\apache-tomcat-9.0.10\webapps\docs\reports\report-%LOGNAME%.html
copy report.log %LOGNAME%\report-%LOGNAME%.log
::cp -r target\surefire-reports %LOGNAME%\
echo http://192.168.33.196:8080/docs/reports/report-%LOGNAME%.html >> report.txt

::python sendMail.py qc@meicai.cn  report.txt
python sendMail.py gaohuidong@meicai.cn  report.txt
